Optimal. Leaf size=176 \[ -\frac{1}{8} \sqrt{1+\sqrt{2}} \log \left (2 \coth ^2(x)-2 \sqrt{1+\sqrt{2}} \coth (x)+\sqrt{2}\right )+\frac{1}{8} \sqrt{1+\sqrt{2}} \log \left (\sqrt{2} \coth ^2(x)+\sqrt{2 \left (1+\sqrt{2}\right )} \coth (x)+1\right )-\frac{\tan ^{-1}\left (\frac{\sqrt{1+\sqrt{2}}-2 \coth (x)}{\sqrt{\sqrt{2}-1}}\right )}{4 \sqrt{1+\sqrt{2}}}+\frac{\tan ^{-1}\left (\frac{2 \coth (x)+\sqrt{1+\sqrt{2}}}{\sqrt{\sqrt{2}-1}}\right )}{4 \sqrt{1+\sqrt{2}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.155104, antiderivative size = 176, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.75, Rules used = {3209, 1169, 634, 618, 204, 628} \[ -\frac{1}{8} \sqrt{1+\sqrt{2}} \log \left (2 \coth ^2(x)-2 \sqrt{1+\sqrt{2}} \coth (x)+\sqrt{2}\right )+\frac{1}{8} \sqrt{1+\sqrt{2}} \log \left (\sqrt{2} \coth ^2(x)+\sqrt{2 \left (1+\sqrt{2}\right )} \coth (x)+1\right )-\frac{\tan ^{-1}\left (\frac{\sqrt{1+\sqrt{2}}-2 \coth (x)}{\sqrt{\sqrt{2}-1}}\right )}{4 \sqrt{1+\sqrt{2}}}+\frac{\tan ^{-1}\left (\frac{2 \coth (x)+\sqrt{1+\sqrt{2}}}{\sqrt{\sqrt{2}-1}}\right )}{4 \sqrt{1+\sqrt{2}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3209
Rule 1169
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{1}{1+\cosh ^4(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1-x^2}{1-2 x^2+2 x^4} \, dx,x,\coth (x)\right )\\ &=\frac{\operatorname{Subst}\left (\int \frac{\sqrt{1+\sqrt{2}}-\left (1+\frac{1}{\sqrt{2}}\right ) x}{\frac{1}{\sqrt{2}}-\sqrt{1+\sqrt{2}} x+x^2} \, dx,x,\coth (x)\right )}{2 \sqrt{2 \left (1+\sqrt{2}\right )}}+\frac{\operatorname{Subst}\left (\int \frac{\sqrt{1+\sqrt{2}}+\left (1+\frac{1}{\sqrt{2}}\right ) x}{\frac{1}{\sqrt{2}}+\sqrt{1+\sqrt{2}} x+x^2} \, dx,x,\coth (x)\right )}{2 \sqrt{2 \left (1+\sqrt{2}\right )}}\\ &=\frac{1}{8} \sqrt{3-2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{\sqrt{2}}-\sqrt{1+\sqrt{2}} x+x^2} \, dx,x,\coth (x)\right )+\frac{1}{8} \sqrt{3-2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{\sqrt{2}}+\sqrt{1+\sqrt{2}} x+x^2} \, dx,x,\coth (x)\right )-\frac{1}{8} \sqrt{1+\sqrt{2}} \operatorname{Subst}\left (\int \frac{-\sqrt{1+\sqrt{2}}+2 x}{\frac{1}{\sqrt{2}}-\sqrt{1+\sqrt{2}} x+x^2} \, dx,x,\coth (x)\right )+\frac{1}{8} \sqrt{1+\sqrt{2}} \operatorname{Subst}\left (\int \frac{\sqrt{1+\sqrt{2}}+2 x}{\frac{1}{\sqrt{2}}+\sqrt{1+\sqrt{2}} x+x^2} \, dx,x,\coth (x)\right )\\ &=-\frac{1}{8} \sqrt{1+\sqrt{2}} \log \left (\sqrt{2}-2 \sqrt{1+\sqrt{2}} \coth (x)+2 \coth ^2(x)\right )+\frac{1}{8} \sqrt{1+\sqrt{2}} \log \left (1+\sqrt{2 \left (1+\sqrt{2}\right )} \coth (x)+\sqrt{2} \coth ^2(x)\right )-\frac{1}{4} \sqrt{3-2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{1-\sqrt{2}-x^2} \, dx,x,-\sqrt{1+\sqrt{2}}+2 \coth (x)\right )-\frac{1}{4} \sqrt{3-2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{1-\sqrt{2}-x^2} \, dx,x,\sqrt{1+\sqrt{2}}+2 \coth (x)\right )\\ &=-\frac{1}{4} \sqrt{-1+\sqrt{2}} \tan ^{-1}\left (\frac{\sqrt{1+\sqrt{2}}-2 \coth (x)}{\sqrt{-1+\sqrt{2}}}\right )+\frac{1}{4} \sqrt{-1+\sqrt{2}} \tan ^{-1}\left (\frac{\sqrt{1+\sqrt{2}}+2 \coth (x)}{\sqrt{-1+\sqrt{2}}}\right )-\frac{1}{8} \sqrt{1+\sqrt{2}} \log \left (\sqrt{2}-2 \sqrt{1+\sqrt{2}} \coth (x)+2 \coth ^2(x)\right )+\frac{1}{8} \sqrt{1+\sqrt{2}} \log \left (1+\sqrt{2 \left (1+\sqrt{2}\right )} \coth (x)+\sqrt{2} \coth ^2(x)\right )\\ \end{align*}
Mathematica [C] time = 0.0706926, size = 45, normalized size = 0.26 \[ \frac{\tanh ^{-1}\left (\frac{\tanh (x)}{\sqrt{1-i}}\right )}{2 \sqrt{1-i}}+\frac{\tanh ^{-1}\left (\frac{\tanh (x)}{\sqrt{1+i}}\right )}{2 \sqrt{1+i}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.018, size = 37, normalized size = 0.2 \begin{align*}{\frac{1}{4}\sum _{{\it \_R}={\it RootOf} \left ( 2\,{{\it \_Z}}^{4}-2\,{{\it \_Z}}^{2}+1 \right ) }{\it \_R}\,\ln \left ( 2\,{\it \_R}\,\tanh \left ( x/2 \right ) + \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\cosh \left (x\right )^{4} + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.4743, size = 1875, normalized size = 10.65 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] time = 1.3491, size = 293, normalized size = 1.66 \begin{align*} -\left (\frac{1}{16} i + \frac{1}{16}\right ) \, \sqrt{2 \, \sqrt{2} - 2}{\left (-\frac{i}{\sqrt{2} - 1} + 1\right )} \log \left (2 \, \sqrt{10 \, \sqrt{2} + 14}{\left (-\frac{i}{5 \, \sqrt{2} + 7} + 1\right )} + \left (4 i + 2\right ) \, e^{\left (2 \, x\right )} + 10\right ) + \left (\frac{1}{16} i + \frac{1}{16}\right ) \, \sqrt{2 \, \sqrt{2} - 2}{\left (-\frac{i}{\sqrt{2} - 1} + 1\right )} \log \left (-2 \, \sqrt{10 \, \sqrt{2} + 14}{\left (-\frac{i}{5 \, \sqrt{2} + 7} + 1\right )} + \left (4 i + 2\right ) \, e^{\left (2 \, x\right )} + 10\right ) - \left (\frac{1}{16} i + \frac{1}{16}\right ) \, \sqrt{2 \, \sqrt{2} + 2}{\left (-\frac{i}{\sqrt{2} + 1} + 1\right )} \log \left (2 \, \sqrt{2 \, \sqrt{2} - 2}{\left (\frac{i}{\sqrt{2} - 1} + 1\right )} + 2 \, e^{\left (2 \, x\right )} + 4 i + 2\right ) + \left (\frac{1}{16} i + \frac{1}{16}\right ) \, \sqrt{2 \, \sqrt{2} + 2}{\left (-\frac{i}{\sqrt{2} + 1} + 1\right )} \log \left (-2 \, \sqrt{2 \, \sqrt{2} - 2}{\left (\frac{i}{\sqrt{2} - 1} + 1\right )} + 2 \, e^{\left (2 \, x\right )} + 4 i + 2\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]